package com.ruoyi.bantong.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bantong.mapper.BtOrganizationAccountRecordMapper;
import com.ruoyi.bantong.domain.BtOrganizationAccountRecord;
import com.ruoyi.bantong.service.IBtOrganizationAccountRecordService;

/**
 * 机构账户变动记录Service业务层处理
 * 
 * @author laohei
 * @date 2021-01-24
 */
@Service
public class BtOrganizationAccountRecordServiceImpl implements IBtOrganizationAccountRecordService 
{
    @Autowired
    private BtOrganizationAccountRecordMapper btOrganizationAccountRecordMapper;

    /**
     * 查询机构账户变动记录
     * 
     * @param oarId 机构账户变动记录ID
     * @return 机构账户变动记录
     */
    @Override
    public BtOrganizationAccountRecord selectBtOrganizationAccountRecordById(Integer oarId)
    {
        return btOrganizationAccountRecordMapper.selectBtOrganizationAccountRecordById(oarId);
    }

    /**
     * 查询机构账户变动记录列表
     * 
     * @param btOrganizationAccountRecord 机构账户变动记录
     * @return 机构账户变动记录
     */
    @Override
    public List<BtOrganizationAccountRecord> selectBtOrganizationAccountRecordList(BtOrganizationAccountRecord btOrganizationAccountRecord)
    {
        return btOrganizationAccountRecordMapper.selectBtOrganizationAccountRecordList(btOrganizationAccountRecord);
    }

    /**
     * 新增机构账户变动记录
     * 
     * @param btOrganizationAccountRecord 机构账户变动记录
     * @return 结果
     */
    @Override
    public int insertBtOrganizationAccountRecord(BtOrganizationAccountRecord btOrganizationAccountRecord)
    {
        btOrganizationAccountRecord.setCreateTime(DateUtils.getNowDate());
        return btOrganizationAccountRecordMapper.insertBtOrganizationAccountRecord(btOrganizationAccountRecord);
    }

    /**
     * 修改机构账户变动记录
     * 
     * @param btOrganizationAccountRecord 机构账户变动记录
     * @return 结果
     */
    @Override
    public int updateBtOrganizationAccountRecord(BtOrganizationAccountRecord btOrganizationAccountRecord)
    {
        btOrganizationAccountRecord.setUpdateTime(DateUtils.getNowDate());
        return btOrganizationAccountRecordMapper.updateBtOrganizationAccountRecord(btOrganizationAccountRecord);
    }

    /**
     * 批量删除机构账户变动记录
     * 
     * @param oarIds 需要删除的机构账户变动记录ID
     * @return 结果
     */
    @Override
    public int deleteBtOrganizationAccountRecordByIds(Integer[] oarIds)
    {
        return btOrganizationAccountRecordMapper.deleteBtOrganizationAccountRecordByIds(oarIds);
    }

    /**
     * 删除机构账户变动记录信息
     * 
     * @param oarId 机构账户变动记录ID
     * @return 结果
     */
    @Override
    public int deleteBtOrganizationAccountRecordById(Integer oarId)
    {
        return btOrganizationAccountRecordMapper.deleteBtOrganizationAccountRecordById(oarId);
    }
}
